﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Management/Management.master" AutoEventWireup="true"
    CodeFile="Company_Vip.aspx.cs" Inherits="Management_Company_Vip" %>

<%@ Import Namespace="Avatar.Company" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <table>
        <tr>
            <td>
                <div class="Dialog">
                    <div class="Title">
                        按条扣费用户列表</div>
                    <div class="Content">
                        <asp:GridView ID="GridView1" runat="server" AllowPaging="True" AutoGenerateColumns="False"
                            CellPadding="4" DataKeyNames="Company" DataSourceID="SqlDataSource1" ForeColor="#333333"
                            GridLines="None" PageSize="20" 
                            EmptyDataText="&lt;div style=&quot;width:300px;&quot;&gt;无内容&lt;/div&gt;">
                            <RowStyle BackColor="#EFF3FB" />
                            <Columns>
                                <asp:TemplateField HeaderText="公司帐号">
                                    <ItemTemplate>
                                        <%# Eval("Company") %>
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="公司名称">
                                    <ItemTemplate>
                                        <%# CompanyInformationManager.GetCompanyInformation(Eval("Company").ToString()) == null ? "资料未填" : CompanyInformationManager.GetCompanyInformation(Eval("Company").ToString()).CompanyName%>
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="操作">
                                    <ItemTemplate>
                                    [<a href='CompanyRecharge.aspx?key=<%# Eval("Company") %>'>充值</a>]&nbsp;
                                        <asp:Button ID="btn_Monthly" runat="server" Text="包月" 
                                            CommandArgument='<%# Eval("company") %>' onclick="btn_Monthly_Click" />
                                        <ajaxToolkit:ConfirmButtonExtender ID="ConfirmButtonExtender1" runat="server" 
                                            ConfirmText="确定要设定此用户为'包月计费用户'吗？" TargetControlID="btn_Monthly">
                                        </ajaxToolkit:ConfirmButtonExtender>
                                    </ItemTemplate>
                                </asp:TemplateField>
                            </Columns>
                            <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                            <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
                            <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
                            <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                            <EditRowStyle BackColor="#2461BF" />
                            <AlternatingRowStyle BackColor="White" />
                        </asp:GridView>
                        <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:AvatarConnectionString %>"
                            SelectCommand="SELECT [ServiceTypeID], [Company] FROM [CompanyService] WHERE ([ServiceTypeID] = @ServiceTypeID)">
                            <SelectParameters>
                                <asp:Parameter DefaultValue="2" Name="ServiceTypeID" Type="Int32" />
                            </SelectParameters>
                        </asp:SqlDataSource>
                    </div>
                </div>
            </td>
        </tr>
    </table>
</asp:Content>
